#pragma once

#include "TextureFormat.h"

namespace Renderer
{
	class Texture2DDescription
	{
	public:
		Texture2DDescription();

		Texture2DDescription(int width, int height, TextureFormat format);

		Texture2DDescription(int width, int height, TextureFormat format, bool generateMipmaps);

		int GetWidth() const;
		int GetHeight() const;
		TextureFormat GetTextureFormat() const;
		bool IsGernateMipmaps() const;
		
		bool IsColorRenderable() const;

		bool IsDepthRenderable() const;

		bool IsDepthStencilRenderable() const;

		/// 
		/// This is approximate because we don't know exactly how the driver stores the texture.
		/// 
		int GetApproximateSizeInBytes() const;

		static int SizeInBytes(TextureFormat format);

		bool operator==(const Texture2DDescription & other);

		bool operator != (const Texture2DDescription& other);

		bool Equals(const Texture2DDescription& other);

	private:
		int _width;
		int _height;
		TextureFormat _format;
		bool _generateMipmaps;
	};
}